package com.ly.heart.util;

import com.kingdee.bos.webapi.entity.IdentifyInfo;
import com.ly.heart.domain.KingOrgEntity;

/**
 * @Author: Wuzh
 * @Description:绑定ERP与金蝶账套对象关系
 * @Date Created in 21:57 2024-09-25
 * @return
 */
public class KingCommonUtil {

    /**
     * 通过账套关系获得金蝶身份信息
     * @param kingOrgEntity
     * @return
     */
    public static IdentifyInfo getIdentifyInfo (KingOrgEntity kingOrgEntity) {
        IdentifyInfo identifyInfo = new IdentifyInfo ();
        identifyInfo.setUserName ( kingOrgEntity.getKingUserName () ); //登录用户名
        identifyInfo.setAppId ( kingOrgEntity.getKingAppId () ); //应用ID
        identifyInfo.setdCID ( kingOrgEntity.getKingDcId () ); //数据中心Id
        identifyInfo.setAppSecret ( kingOrgEntity.getKingAppSecret () ); //秘钥
        identifyInfo.setlCID ( 2052 );
        identifyInfo.setServerUrl ( kingOrgEntity.getKingUrl () );
        return identifyInfo;
    }

}
